From 770f0180c57cdeb71835c42d362b209c8bded63d Mon Sep 17 00:00:00 2001 From: Greg Sabino Mullane Date: Mon, 16 Jul 2007 21:28:01 +0000 Subject: [PATCH] Fix bug 10608, plus a bonus one that was hidden by that bug. --- includes/DatabasePostgres.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/includes/DatabasePostgres.php b/includes/DatabasePostgres.php index 7c2a2aade0..947d5264f1 100644 --- a/includes/DatabasePostgres.php +++ b/includes/DatabasePostgres.php @@ -1016,7 +1016,7 @@ END; ."WHERE n.nspowner=r.oid AND n.nspname = '$eschema'"; $res = $this->query( $SQL ); if ( $res && $res->numRows() ) { - $row = $res->fetchRow(); + $row = $res->fetchObject(); $owner = $row->rolname; } else { $owner = false; @@ -1104,8 +1104,7 @@ END; $tss = $this->addQuotes($wgDBts2schema); $pgp = $this->addQuotes($wgDBport); $dbn = $this->addQuotes($this->mDBname); - $ctypeRow = $this->doQuery("SHOW lc_ctype")->fetchArray(); - $ctype = $ctypeRow[0]; + $ctype = pg_fetch_result($this->doQuery("SHOW lc_ctype"),0,0); $SQL = "UPDATE mediawiki_version SET mw_version=$mwv, pg_version=$pgv, pg_user=$pgu, ". "mw_schema = $mws, ts2_schema = $tss, pg_port=$pgp, pg_dbname=$dbn, ". -- 2.20.1